package com.itheima.MOop;

public class Student1 {
    private String name;
    private int age;
    //提供无参构造
    public Student1(){//无参构造
        System.out.println("无参构造执行了...");
    }
        //提供带参构造
    public Student1(String name,int age){
        this.name = name;
        this.age = age;
        System.out.println("我是Stuent1的带参构造方法");
    }
    //私有成员提供get/set
    public String getName(){
        return name;
    }
    public void setName(String name){
        this.name = name;
    }

    public int getAge(){
        return age;
    }
    public void setage(int age) {
        this.age = age;
    }
    public void show(){
        System.out.println(name+ "...."+ age);
    }
}
